package logic.bean;

import java.io.Serializable;


public class BookInfo
        implements
        Serializable
{
	private static final long  serialVersionUID = -64424413311521103L;
	public static final String AudioBook_Type   = "5";
	private String             author;                                //作者名，多个以英文逗号隔开
	private String             authorId;                               //作者id，，多个以英文逗号隔开
	private long               bookId;
	private String             bookType;                              //电子书类型。电子书类型 1=流式 2=版式
	private int                columnId;
	private String             columnName;
	private String             content_type;                          //书籍内容类型，内容类型 1=书籍 2=杂志 3=连载 4=漫画 5=有声读物
	private String             cpId;
	private String             cpName;
	private String             editorRecommend;
	private int                firstSortId;
	private String             firstSortName;
	private String             isEpbook;                              //是否内刊 y=是 n=否
	private String             isFinished;                            //是否完结 y=是 n=否
	private String             isSerialize;                           //是否连载，y|n：连载|不连载
	private String             logoUrl;
	private String             longIntro;
	private String             name;
	private String             recommend;
	private int                secondSortId;
	private String             secondSortName;
	private String             shortIntro;
	private String             tagName;
	private int                totalChapters;                         // 总章数
	private int                totalVolumes;                          // 总卷数
	private int                wordCount;
	private String             entityBalance;
	private String             announcerName;
	private String             logoUrl2;
	private String             isbn;
	private String             keyWords;
	private String             grade;
	private int                chargeFee;
	private String             allowDownload;
	private String             isFree;
	private String             chargeType;
	private String             allowComment;
	private String             downType;
	private String             ncxUrl;
	private String             contentTagName;
	private String             channelTagName;
	private String			   coverTagPicUrl;
	private String			   coverTagPicUrl2;
	
	/** JournalColumn -> BookInfo */
	public static BookInfo toBookInfo(JournalColumn column) {
		final BookInfo info = new BookInfo(column.getAuthor(),
		                                   column.getAuthorId(),
		                                   column.getBookId(),
		                                   column.getBookType(),
		                                   column.getColumnId(),
		                                   column.getColumnName(),
		                                   column.getContent_type(),
		                                   column.getCpId(),
		                                   column.getCpName(),
		                                   column.getEditorRecommend(),
		                                   column.getFirstSortId(),
		                                   column.getFirstSortName(),
		                                   column.getIsEpbook(),
		                                   column.getIsFinished(),
		                                   column.getIsSerialize(),
		                                   column.getLogoUrl(),
		                                   column.getLongIntro(),
		                                   column.getName(),
		                                   column.getRecommend(),
		                                   column.getSecondSortId(),
		                                   column.getSecondSortName(),
		                                   column.getShortIntro(),
		                                   column.getTagName(),
		                                   column.getTotalChapters(),
		                                   column.getTotalVolumes(),
		                                   column.getWordCount(),
		                                   column.getEntityBalance(),
		                                   column.getAnnouncerName(),
		                                   column.getLogoUrl2(),
		                                   column.getIsbn(),
		                                   column.getKeyWords(),
		                                   column.getGrade(),
		                                   column.getChargeFee(),
		                                   column.getAllowDownload(),
		                                   column.getIsFree(),
		                                   column.getChargeType(),
		                                   column.getAllowComment(),
		                                   column.getDownType(),
		                                   column.getNcxUrl(),
		                                   column.getContentTagName(),
		                                   column.getChannelTagName());
		return info;
	}
	
	public BookInfo(String tagName, String recommend, long bookId, String logoUrl, String author, String shortIntro, String name, String bookType) {
		super();
		this.tagName = tagName;
		this.recommend = recommend;
		this.bookId = bookId;
		this.logoUrl = logoUrl;
		this.author = author;
		this.shortIntro = shortIntro;
		this.name = name;
		this.bookType = bookType;
	}
	
	public BookInfo(
	        String author,
	        String authorId,
	        long bookId,
	        String bookType,
	        int columnId,
	        String columnName,
	        String content_type,
	        String cpId,
	        String cpName,
	        String editorRecommend,
	        int firstSortId,
	        String firstSortName,
	        String isEpbook,
	        String isFinished,
	        String isSerialize,
	        String logoUrl,
	        String longIntro,
	        String name,
	        String recommend,
	        int secondSortId,
	        String secondSortName,
	        String shortIntro,
	        String tagName,
	        int totalChapters,
	        int totalVolumes,
	        int wordCount,
	        String entityBalance,
	        String announcerName,
	        String logoUrl2,
	        String isbn,
	        String keyWords,
	        String grade,
	        int chargeFee,
	        String allowDownload,
	        String isFree,
	        String chargeType,
	        String allowComment,
	        String downType,
	        String ncxUrl,
	        String contentTagName,
	        String channelTagName/*,
	        String coverTagPicUrl,
	        String coverTagPicUrl2*/) {
		super();
		this.author = author;
		this.authorId = authorId;
		this.bookId = bookId;
		this.bookType = bookType;
		this.columnId = columnId;
		this.columnName = columnName;
		this.content_type = content_type;
		this.cpId = cpId;
		this.cpName = cpName;
		this.editorRecommend = editorRecommend;
		this.firstSortId = firstSortId;
		this.firstSortName = firstSortName;
		this.isEpbook = isEpbook;
		this.isFinished = isFinished;
		this.isSerialize = isSerialize;
		this.logoUrl = logoUrl;
		this.longIntro = longIntro;
		this.name = name;
		this.recommend = recommend;
		this.secondSortId = secondSortId;
		this.secondSortName = secondSortName;
		this.shortIntro = shortIntro;
		this.tagName = tagName;
		this.totalChapters = totalChapters;
		this.totalVolumes = totalVolumes;
		this.wordCount = wordCount;
		this.entityBalance = entityBalance;
		this.announcerName = announcerName;
		this.logoUrl2 = logoUrl2;
		this.isbn = isbn;
		this.keyWords = keyWords;
		this.grade = grade;
		this.chargeFee = chargeFee;
		this.allowDownload = allowDownload;
		this.isFree = isFree;
		this.chargeType = chargeType;
		this.allowComment = allowComment;
		this.downType = downType;
		this.ncxUrl = ncxUrl;
		this.contentTagName = contentTagName;
		this.channelTagName=channelTagName;
/*		this.coverTagPicUrl = coverTagPicUrl;
		this.coverTagPicUrl2 = coverTagPicUrl2;*/
	}
	
	public BookInfo(){
		super();
	}
	
	@Override
	public String toString() {
		return "BookInfo [author=" + author + ", bookType=" + bookType + ", columnName=" + columnName + ", content_type=" + content_type + ", editorRecommend=" + editorRecommend + ", firstSortName=" + firstSortName + ", isEpbook=" + isEpbook + ", isFinished=" + isFinished + ", isSerialize=" + isSerialize + ", logoUrl=" + logoUrl + ", name=" + name + ", secondSortName=" + secondSortName + ", tagName=" + tagName + ", downType=" + downType + "]";
	}
	
	public String getAuthor() {
		return author;
	}
	
	public void setAuthor(String author) {
		this.author = author;
	}
	
	public String getAuthorId() {
		return authorId;
	}
	
	public void setAuthorId(String authorId) {
		this.authorId = authorId;
	}
	
	public long getBookId() {
		return bookId;
	}
	
	public void setBookId(long bookId) {
		this.bookId = bookId;
	}
	
	public String getBookType() {
		return bookType;
	}
	
	public void setBookType(String bookType) {
		this.bookType = bookType;
	}
	
	public int getColumnId() {
		return columnId;
	}
	
	public void setColumnId(int columnId) {
		this.columnId = columnId;
	}
	
	public String getColumnName() {
		return columnName;
	}
	
	public void setColumnName(String columnName) {
		this.columnName = columnName;
	}
	
	public String getContent_type() {
		return content_type;
	}
	
	public void setContent_type(String content_type) {
		this.content_type = content_type;
	}
	
	public String getCpId() {
		return cpId;
	}
	
	public void setCpId(String cpId) {
		this.cpId = cpId;
	}
	
	public String getCpName() {
		return cpName;
	}
	
	public void setCpName(String cpName) {
		this.cpName = cpName;
	}
	
	public String getEditorRecommend() {
		return editorRecommend;
	}
	
	public void setEditorRecommend(String editorRecommend) {
		this.editorRecommend = editorRecommend;
	}
	
	public int getFirstSortId() {
		return firstSortId;
	}
	
	public void setFirstSortId(int firstSortId) {
		this.firstSortId = firstSortId;
	}
	
	public String getFirstSortName() {
		return firstSortName;
	}
	
	public void setFirstSortName(String firstSortName) {
		this.firstSortName = firstSortName;
	}
	
	public String getIsEpbook() {
		return isEpbook;
	}
	
	public void setIsEpbook(String isEpbook) {
		this.isEpbook = isEpbook;
	}
	
	public String getIsFinished() {
		return isFinished;
	}
	
	public void setIsFinished(String isFinished) {
		this.isFinished = isFinished;
	}
	
	public String getIsSerialize() {
		return isSerialize;
	}
	
	public void setIsSerialize(String isSerialize) {
		this.isSerialize = isSerialize;
	}
	
	public String getLogoUrl() {
		return logoUrl;
	}
	
	public void setLogoUrl(String logoUrl) {
		this.logoUrl = logoUrl;
	}
	
	public String getLongIntro() {
		return longIntro;
	}
	
	public void setLongIntro(String longIntro) {
		this.longIntro = longIntro;
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getRecommend() {
		return recommend;
	}
	
	public void setRecommend(String recommend) {
		this.recommend = recommend;
	}
	
	public int getSecondSortId() {
		return secondSortId;
	}
	
	public void setSecondSortId(int secondSortId) {
		this.secondSortId = secondSortId;
	}
	
	public String getSecondSortName() {
		return secondSortName;
	}
	
	public void setSecondSortName(String secondSortName) {
		this.secondSortName = secondSortName;
	}
	
	public String getShortIntro() {
		return shortIntro;
	}
	
	public void setShortIntro(String shortIntro) {
		this.shortIntro = shortIntro;
	}
	
	public String getTagName() {
		return tagName;
	}
	
	public void setTagName(String tagName) {
		this.tagName = tagName;
	}
	
	public int getTotalChapters() {
		return totalChapters;
	}
	
	public void setTotalChapters(int totalChapters) {
		this.totalChapters = totalChapters;
	}
	
	public int getTotalVolumes() {
		return totalVolumes;
	}
	
	public void setTotalVolumes(int totalVolumes) {
		this.totalVolumes = totalVolumes;
	}
	
	public int getWordCount() {
		return wordCount;
	}
	
	public void setWordCount(int wordCount) {
		this.wordCount = wordCount;
	}
	
	public String getEntityBalance() {
		return entityBalance;
	}
	
	public void setEntityBalance(String entityBalance) {
		this.entityBalance = entityBalance;
	}
	
	public String getAnnouncerName() {
		return announcerName;
	}
	
	public void setAnnouncerName(String announcerName) {
		this.announcerName = announcerName;
	}
	
	public String getLogoUrl2() {
		return logoUrl2;
	}
	
	public void setLogoUrl2(String logoUrl2) {
		this.logoUrl2 = logoUrl2;
	}
	
	public String getIsbn() {
		return isbn;
	}
	
	public void setIsbn(String isbn) {
		this.isbn = isbn;
	}
	
	public String getKeyWords() {
		return keyWords;
	}
	
	public void setKeyWords(String keyWords) {
		this.keyWords = keyWords;
	}
	
	public String getGrade() {
		return grade;
	}
	
	public void setGrade(String grade) {
		this.grade = grade;
	}
	
	public int getChargeFee() {
		return chargeFee;
	}
	
	public void setChargeFee(int chargeFee) {
		this.chargeFee = chargeFee;
	}
	
	public String getAllowDownload() {
		return allowDownload;
	}
	
	public void setAllowDownload(String allowDownload) {
		this.allowDownload = allowDownload;
	}
	
	public String getIsFree() {
		return isFree;
	}
	
	public void setIsFree(String isFree) {
		this.isFree = isFree;
	}
	
	public String getChargeType() {
		return chargeType;
	}
	
	public void setChargeType(String chargeType) {
		this.chargeType = chargeType;
	}
	
	public String getAllowComment() {
		return allowComment;
	}
	
	public void setAllowComment(String allowComment) {
		this.allowComment = allowComment;
	}
	
	/**
	 * @return the downType
	 */
	public String getDownType() {
		return downType;
	}
	
	/**
	 * @param downType
	 *            the downType to set
	 */
	public void setDownType(String downType) {
		this.downType = downType;
	}

	/**
	 * @return the ncxUrl
	 */
	public String getNcxUrl() {
		return ncxUrl;
	}

	/**
	 * @param ncxUrl the ncxUrl to set
	 */
	public void setNcxUrl(String ncxUrl) {
		this.ncxUrl = ncxUrl;
	}

	/**
	 * @return the contentTagName
	 */
	public String getContentTagName() {
		return contentTagName;
	}

	/**
	 * @param contentTagName the contentTagName to set
	 */
	public void setContentTagName(String contentTagName) {
		this.contentTagName = contentTagName;
	}

	/**
	 * @return the channelTagName
	 */
	public String getChannelTagName() {
		return channelTagName;
	}
    /** 客户端书籍封面标签 */
	public String getCoverTagPicUrl() {
		return coverTagPicUrl;
	}
	/** 客户端书籍封面标签 */
	public void setCoverTagPicUrl(String coverTagPicUrl) {
		this.coverTagPicUrl = coverTagPicUrl;
	}
	/** pad端书籍封面标签 */
	public String getCoverTagPicUrl2() {
		return coverTagPicUrl2;
	}
	/** pad端书籍封面标签 */
	public void setCoverTagPicUrl2(String coverTagPicUrl2) {
		this.coverTagPicUrl2 = coverTagPicUrl2;
	}

	/**
	 * @param channelTagName the channelTagName to set
	 */
	public void setChannelTagName(String channelTagName) {
		this.channelTagName = channelTagName;
	}
	
}
